package basic50.thirtieth;

import java.util.Scanner;

public class Basic24 {
    public static void main(String[] args) {
       // 题目：给一个不多于5位的正整数，要求：一、求它是几位数，二、逆序打印出各位数字
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        while (n != 0){
            int temp = n%10;
            System.out.print(temp);
            n = n/10;
            sum ++;
        }
        System.out.println("  "+sum +"位数");
    }
}
